#
#        Python GUI - Containers - Swing
#

from GContainers import Container as GContainer
import javax.swing as swing

class Container(GContainer):
    def __init__(self, _j_view=None, **kwds):
        self._j_view=_j_view
        GContainer.__init__(self,**kwds)
        
    def destroy(self):
        GContainer.destroy(self)
        self._j_view=None
        
    def _add(self,comp):
        GContainer._add(self,comp)
        self._j_view.add(comp._j_obj)
    
    def _remove(self,comp):
        GContainer._remove(self,comp)
        self._j_view.remove(comp._j_obj)